// RandomNumbersDlg.h : header file
//

#if !defined(AFX_RANDOMNUMBERSDLG_H__25ADE45D_4FE0_490C_8D25_AB5F6C42EC25__INCLUDED_)
#define AFX_RANDOMNUMBERSDLG_H__25ADE45D_4FE0_490C_8D25_AB5F6C42EC25__INCLUDED_

#include <wincrypt.h>

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CRandomNumbersDlg dialog

class CRandomNumbersDlg : public CDialog
{
// Construction
public:
	CRandomNumbersDlg(CWnd* pParent = NULL);	// standard constructor

	~CRandomNumbersDlg()
	{
		if(!CryptReleaseContext(hProv, 0)) {
			printf("Error %x during CryptReleaseContext!\n", GetLastError());
			return;
		}
	}

// Dialog Data
	//{{AFX_DATA(CRandomNumbersDlg)
	enum { IDD = IDD_RANDOMNUMBERS_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRandomNumbersDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	HCRYPTPROV hProv;
	void GenerateRandom(void *lpGood, DWORD cbGood);

	// Generated message map functions
	//{{AFX_MSG(CRandomNumbersDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	virtual void OnOK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RANDOMNUMBERSDLG_H__25ADE45D_4FE0_490C_8D25_AB5F6C42EC25__INCLUDED_)
